package practice06;

/**
 * @author Administrator
 * @version V1.0
 * @ProjectName:IntelliJ IDEA
 * @PackageName: practice06
 * @ClassName: Teacher
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2019/12/10 10:32
 * @Copyright 大牛版板所有
 */
public class Teacher extends Person {
    private double basePay;
    private int classHour;

    public Teacher() {
    }

    public Teacher(double basePay, int classHour) {
        this.basePay = basePay;
        this.classHour = classHour;
    }

    public double getBasePay() {
        return basePay;
    }

    public void setBasePay(double basePay) {
        this.basePay = basePay;
    }

    public int getClassHour() {
        return classHour;
    }

    public void setClassHour(int classHour) {
        this.classHour = classHour;
    }

    @Override
    public void pay(){
        this.wages = this.getBasePay()+this.getClassHour()*45;
        System.out.println("教师的工资支出为："+this.wages);
    }
}
